from flask_admin import Admin
from flask_admin.contrib.sqla import ModelView

from apps.df_goods.models import Goods
from apps.df_users.models import User
from config.exts import db

admin = Admin()


def init_admin(app):
    admin.init_app(app)
    admin.add_view(ModelView(Goods, db.session))